package org.chs.ts.batch.constant;

import lombok.Getter;

/**
 * @author wuwei
 * @date 2024/11/20
 * @apiNote 跑批任务执行返回码
 */
@Getter
public enum TaskStatusCodeEnum {
    TASK_ERROR("500","批量任务执行失败","500"),
    TASK_INIT_ERROR("500","批量任务初始化失败-初始化请求失败","500"),
    TASK_GETTASK_NULL_SUCCESS("201","批量任务抢夺成功-未获得任务对象","200"),
    TASK_GETTASK_ERROR("500","批量任务抢夺失败-请求失败","500"),
    TASK_GETTASK_RUNNINGERROR("501","批量任务抢夺失败-运行异常","500"),
    TASK_RUNNING_ERROR("500","批量任务执行失败-任务执行请求失败","500"),
    TASK_RUNNING_RUNNINGERROR("501","批量任务执行失败-任务执行异常","500"),
    ;
    ;
    ;

    TaskStatusCodeEnum(String retCd,String retMsg,String taskRetCode) {
        this.retCd = retCd;
        this.retMsg = retMsg;
        this.taskRetCode = taskRetCode;
    }

    /**
     * 返回码
     */
    private final String retCd;
    /**
     * 返回信息
     */
    private final String retMsg;
    /**
     * 返回 对应 controller Result 的操作码
     */
    private final String taskRetCode;
}
